-
Notifications
You must be signed in to change notification settings - Fork 2
Move integration tests into Storybook’s browser test harness #109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Owner
Nowely
commented
Dec 6, 2025
- Reorganizes Storybook to a src/pages structure with updated .storybook config and Vite/Vitest browser setup (Playwright, vitest-browser-react) plus new helpers (focus, withStyle, createVisualTests) to run stories as visual/interaction specs.
- Ports MarkedInput integration coverage into Storybook-co-located specs (Base, Overlay, Slots, Nested) and auto-discovers all stories via stories.spec.tsx; removes the old packages/tests package.
- Polishes Markput typings and docs (slot props, handler docs, parsing benchmarking README), enables declaration emit in root tsconfig, and refreshes .gitignore/.prettierignore.
- Updates website to Astro 5 with stricter tsconfig, astro:content shim, and a richer custom overlay demo/doc (GitHub user fetch via useOverlay).
… filtering condition
- Updated package.json scripts to streamline testing and build processes. - Migrated test configurations to utilize Vitest for improved testing capabilities. - Added new integration tests for MarkedInput and Overlay components, enhancing test coverage. - Removed deprecated tests package and consolidated testing utilities. - Updated dependencies in package.json for better compatibility and performance.
- Changed package names to include the @markPut scope for app, storybook, and website. - Updated script commands in the root package.json to reflect the new package names and streamline testing processes. - Ensured consistency across package.json files for better organization and clarity.
- Updated package.json scripts to simplify development and build processes. - Removed deprecated stories.tsx file and added new configuration files for Storybook. - Introduced new components including Button, Text, and MaterialMentions with corresponding styles. - Updated story imports to reflect new component structure. - Enhanced testing utilities for better integration with Storybook stories.
- Changed the stories path in Storybook configuration to point to the new source directory. - Introduced new components including Button, MaterialMentions, and their respective styles. - Added utility functions for handling styles and fetching user data. - Created new stories for various components to enhance documentation and testing. - Improved overall structure and organization of Storybook stories for better clarity.
…sting - Updated the Vitest configuration to include new test paths for better organization. - Changed the stories path in Storybook configuration to reflect the new structure. - Introduced new components including Ant, Base, Dynamic, Material, Overlay, and Rsuite with corresponding stories. - Added utility functions and improved the overall structure of Storybook stories for clarity and maintainability. - Enhanced testing coverage with new spec files for various components, ensuring robust functionality.
- Updated Vite configuration to include testing setup with Vitest, specifying globals, environment, and coverage options. - Removed the deprecated Vitest configuration file to streamline the project structure.
- Updated package.json files to reflect new versions for TypeScript, Vite, and various dependencies, ensuring compatibility and performance improvements. - Adjusted sed commands in package.json scripts for better path handling. - Enhanced pnpm-lock.yaml to align with updated package versions and dependencies. - Refined pnpm-workspace.yaml for improved package structure and catalog entries.
…ed UI - Modified the import statement for the Text component to use the new path from '../../shared/ui/Text'. - Ensured consistency in component imports for better organization and maintainability of Storybook stories.
- Added @types/react and @types/react-dom to storybook devDependencies - Added resolve.dedupe for react and react-dom in vite.config.ts - This fixes 'Objects are not valid as a React child' error caused by multiple React versions being resolved (18.3.1 vs 19.2.0 from website)
- Changed react, react-dom, @types/react, @types/react-dom to use catalog: - This ensures all packages in monorepo use the same React version (18.3.1) - @astrojs/react supports React 18.x
…editing - Introduced `SingleEditableControlled` and `SingleEditableUncontrolled` components to demonstrate controlled and uncontrolled contentEditable approaches. - Added `SingleEditableMarkdown` component for Markdown editing with real-time preview and conversion. - Created corresponding stories in `Experimental.stories.tsx` to showcase the functionality and differences between controlled and uncontrolled editing experiences. - Implemented utility functions for HTML to plain text and Markdown conversions, enhancing the editing capabilities. - Included custom components for rendering and handling Markdown formatting, ensuring a smooth user experience.
- Replaced direct imports of Story from the utility file with composeStories in various spec files. - Introduced a new shared focus utility for managing caret positions in contenteditable elements. - Removed the deprecated stories utility file to streamline the testing structure. - Updated tests across multiple components to enhance clarity and maintainability.
- Updated import paths for the Text component across multiple stories to use the new shared components directory. - Introduced new Button and MaterialMentions components with corresponding styles and utility functions. - Added Tabs component and its associated hooks for better tab management in Storybook. - Enhanced overall organization and maintainability of Storybook stories by restructuring component imports.
- Introduced a new MarkdownOptions component to define preset configurations for markdown formatting. - Implemented default light theme styles for various markdown elements including headers, lists, and text formatting. - Updated Nested stories to import the new MarkdownOptions for improved organization and maintainability.
- Introduced rc-marked-input for improved markdown handling within the app. - Updated package.json and pnpm-lock.yaml to include rc-marked-input as a dependency. - Implemented a new ConfiguredMarkedInput component to manage markdown input with custom button rendering and markup options. - Enhanced the main App component to utilize the new markdown input functionality, providing a better user experience for text input and display.
- Added @vitest/browser-playwright as a dependency for improved testing capabilities. - Updated Vite configuration to enable browser testing with Playwright. - Refactored test cases in Overlay and Slots components for better clarity and organization. - Adjusted package.json to remove jsdom dependency, streamlining the testing setup. - Improved keyboard.spec.tsx with a new test case for keyboard shortcuts.
- Changed existing test cases in Base.spec.tsx and keyboard.spec.tsx to 'it.todo' for better clarity on pending implementations. - This update helps in tracking tests that need to be completed while maintaining the current test structure.
- Replaced instances of user-event with vitest/browser's userEvent in various test files to enhance compatibility with the testing framework. - Updated focus utility functions to set caret positions using custom logic instead of user.pointer, improving test reliability. - Marked several tests as 'todo' to indicate pending implementations and adjustments needed for selection change events. - Removed deprecated user-event imports to streamline the testing setup.
…ssertions to use vitest/browser's expect.element for improved compatibility. This change enhances the reliability of tests across various components in Storybook.
…wser's expect.element for improved reliability in rendering nested marks and handling edge cases.
…ser's expect.element for improved reliability in rendering and handling various slot scenarios.
…g and user interactions - Replaced instances of @testing-library/react with vitest-browser-react in various test files to enhance compatibility with the testing framework. - Updated test assertions to use vitest/browser's expect.element for improved reliability in rendering components and handling user interactions. - Removed deprecated imports and streamlined the testing setup across multiple components, including Base, Nested, and Slots. - Marked several tests as 'todo' to indicate pending implementations and adjustments needed for specific cases.
- Commented out existing test implementations in Base.spec.tsx and keyboard.spec.tsx to indicate pending work on text selection and keyboard interactions. - Updated the documentation in htmlToPlainText.ts files to clarify the format for <mark> elements. - Streamlined test setup for better alignment with vitest/browser's capabilities.
… performance - Bumped versions of several packages including `oxlint`, `prettier`, `vite`, and `@mui/material` to their latest releases. - Updated `@vitest/coverage-v8` and `@vitest/ui` to version 4.0.15 for enhanced testing capabilities. - Adjusted `astro` version to 5.16.4 for better integration with the latest features. - Ensured consistency in package versions across `package.json` and `pnpm-lock.yaml` files.
- Updated viewport settings in Vite configuration for improved responsiveness. - Removed deprecated preview-head.html file to streamline Storybook setup. - Refactored story tests to dynamically import and categorize stories, enhancing maintainability. - Added createVisualTests utility for automated visual regression testing of stories. - Improved error handling in useFetch hook to reduce noise from aborted fetch requests. - Introduced style management in withStyle component to ensure styles are loaded correctly during tests.
…nd functionality - Added new entries to .prettierignore to exclude specific Vercel and documentation directories. - Adjusted pnpm-workspace.yaml for consistent package listing format. - Updated README.md to fix formatting issues in documentation links. - Refactored Button component in index.tsx for cleaner syntax. - Added a new coverage script to package.json for easier test coverage reporting. - Translated comments in parser.profile.bench.ts and parsing README.md from Russian to English for better accessibility. - Improved formatting and clarity in various Storybook test files and documentation.
…or story tests to eliminate category dependency, enhancing test clarity and maintainability.
- Removed the integration test script from package.json for better clarity. - Updated TypeScript configuration to include "vite/client" types for improved compatibility. - Cleaned up story tests by removing unnecessary comments and enhancing readability. - Added a TODO comment for untyped ref in createMarkedInput.spec.tsx to indicate pending work.
…finitions - Updated line numbers in the documentation to match the latest changes in the MarkedInputHandler type definitions in types.ts.
- Introduced a new type definition file for 'astro:content' to enhance type safety and provide better integration with Astro's content features. - Updated tsconfig.json to include "astro/client" and "vite/client" types for improved type support and added "verbatimModuleSyntax" for better module resolution.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…tent - Added "./src/types/astro-content-shim" to the "types" array in tsconfig.json to enhance type safety and integration with Astro's content features.
- Maintained the "composite" option in Storybook's tsconfig.json for consistency. - Cleaned up a comment in createMarkedInput.spec.tsx for clarity. - Removed an unnecessary blank line in astro-content-shim.d.ts to streamline the type definitions.
- Excluded the website package from the main TypeScript compilation by adding it to the "exclude" array in tsconfig.json. - Added a new "sync" script to the website's package.json for easier synchronization. - Removed the custom type definitions for 'astro:content' from the website's tsconfig.json and deleted the corresponding type definition file to streamline type management.
- Modified the "typecheck" script in package.json to include a check for the @markput/website package. - Added new dependencies for @astrojs/check and typescript in package.json. - Updated pnpm-lock.yaml to reflect the addition of new packages and their versions, ensuring compatibility with the latest TypeScript and Astro features.
- Included a step in the CI workflow to install Playwright browsers with dependencies, ensuring that the testing environment is properly set up for running tests.
- Changed the Playwright browser installation step in the CI workflow to specifically install Chromium using pnpm, ensuring a more efficient setup for testing.
- Added Playwright version 1.57.0 to package.json and pnpm-lock.yaml for improved testing capabilities. - Removed the specific installation step for Playwright Chromium from the CI workflow to streamline the setup process.
- Added a step in the CI workflow to install Playwright browsers along with their dependencies, ensuring a complete testing environment for running tests.
- Modified the CI workflow to install Playwright Chromium specifically with pnpm, ensuring a more efficient setup for testing with dependencies.
…date CI workflow to install Playwright Chromium using pnpm dlx for improved testing setup.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.